package subRouters

import (
	"gin_template/controller"
	"gin_template/core/middleware"
	_ "gin_template/docs"

	"github.com/gin-gonic/gin"
)

func RegisterApiRouter(router *gin.Engine) {
	api := router.Group("/gin_template")
	api.GET("/verifyToken", controller.VerifyToken)
	api.POST("/register", controller.Register)
	api.POST("/login", controller.Login)
	api.Use(middleware.JWTAuthMiddleware())
	{
		api.POST("/getUserByCondition", controller.GetUserByCondition)
		api.POST("/insertUser", controller.InsertUser)
		api.POST("/deleteUser", controller.DeleteUser)
		api.POST("/updateUser", controller.UpdateUser)
		api.POST("/getUser", controller.GetUser)
	}
}
